package com.syxx.oa.service.impl;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.syxx.oa.dao.DepartMentDao;
import com.syxx.oa.domain.Department;
import com.syxx.oa.service.DepartMentService;
import com.test.jbpm.Pager;


@Service
public class DepartMentServiceImpl implements DepartMentService {

	private DepartMentDao depDao;
	
	@Autowired
	public void setDepDao(DepartMentDao depDao) {
		this.depDao = depDao;
	}

	public void addOrUpdate(Department dep) {
		depDao.addOrUpdate(dep);

	}

	public void del(Long depId) {
		depDao.del(depId);
	}

	public void del(Long[] depIds) {
		for (Long id : depIds) {
			depDao.del(id);
		}

	}

	public Department findDepById(Long depId) {
		
		return depDao.findDepById(depId);
	}

	public Pager<Department> findDepList() {
		return depDao.findDepList();
	}

	public List<Department> findDepList(HashMap<String, String> key){
		return depDao.findDepList(key);
	}
}
